package com.taxi.remote;

import com.taxi.dto.PriceRule;
import com.taxi.request.PriceRuleIsNewRequest;
import com.taxi.result.Result;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

/**
 * @Author: aniu
 * @Date: 2023/10/5
 * @ClassName: ServicePriceClient
 * @Description: Write class functionality and purpose here.
 * @Version: 1.0
 */
@FeignClient("service-price")
public interface ServicePriceClient {
    @PostMapping ("/price-rule/is-new")
    public Result<Boolean> isNew(@RequestBody PriceRuleIsNewRequest priceRuleIsNewRequest);

    @GetMapping("/price-rule/if-exists/{cityCode}/{vehicleType}")
    public Result<Boolean> ifPriceExists(@PathVariable String cityCode,@PathVariable String vehicleType);

    @PostMapping("/calculate-price")
    public Result<Double> calculatePrice(@RequestParam Integer distance, @RequestParam Integer duration,
                                 @RequestParam String cityCode, @RequestParam String vehicleType);
}
